<?php
namespace Common\Models;
use Common\BaseModel;
class CollegeCategories extends BaseModel
{
    public $res;
    public $key;
    public function getSource()
    {
        return "f_college_categories";
    }

    public function initialize()
    {
        parent::initialize();
    }


    /**
     * 获取栏目下面的分类
     * @param int $cid 栏目id
     * @return mixed
     */
    public function find_list($cid){
        $conditions="is_show=1 AND cid={$cid}";
        $order="sort ASC,id ASC";
        $carousel_list = $this::find(
            array(
                $conditions,
                "order" => $order,
                "columns"=>"id,name"
            )
        )->toarray();
        return $carousel_list;
    }





}
